/**
 * Created with IntelliJ IDEA.
 * User: Administrator
 * Date: 12-12-15
 * Time: 下午3:02
 * To change this template use File | Settings | File Templates.
 */
Ext.define('Airways.controller.system.operationrole.OperationRoleController',{
    extend:'Ext.app.Controller',
    models:['system.operation.OperationManageModel','system.role.RoleManageModel'],
    stores:['system.roleoperation.OperationManageStore','system.role.RoleManageStore'],
    views:['system.operationrole.OperationRoleView'],
    refs:[
        {ref:'operationRoleView',selector:'operationRoleView'},
        {ref:'operationRoleLeft',selector:'operationRoleLeft'},
        {ref:'operationRoleRight',selector:'operationRoleRight'}
    ],
    init:function(){
        var controller = this;
        this.control({
            'operationRoleView':{
                afterrender:function(){
                }

            },
            'operationRoleLeft':{
                load:function(){
                    controller.getOperationRoleLeft().expandAll();
                },
                itemclick:function(view,record,item,index,e,eOpts ){
                    alert(record.data.operationId);
                }
            },
            'operationRoleRight':{
                afterrender:function(){
                }
            }
        })
    }
})
